package com.sumainfor.pc.epc.fallback.ZfallBack;

import com.google.common.collect.Maps;
import com.sumainfor.common.util.JsonResult;
import com.sumainfor.common.utlis.Pager;
import com.sumainfor.pc.epc.feign.Zfeign.ZzuulFeign;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.compress.utils.Lists;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * 功能描述:调用网关服务
 */
@Component
@Slf4j
public class ZuulFeignFallback implements ZzuulFeign {

    @Override
    public JsonResult getRepairUserList(Map<String, Object> params) {
        return JsonResult.error("服务器繁忙...");
    }

    @Override
    public JsonResult getRuserList(Map<String, Object> params) {
        return JsonResult.error("服务器繁忙...");
    }

    @Override
    public JsonResult AddMessage(Map<String, Object> params) {
        return JsonResult.error("服务器繁忙...");
    }

    @Override
    public JsonResult getMessageList(Map<String, Object> params, Pager pager) {
        return JsonResult.error("服务器繁忙...");
    }

    @Override
    public JsonResult getLoginName(Map<String, Object> params) {
        return JsonResult.error("服务器繁忙...");
    }

    @Override
    public JsonResult getAreaInfoForGSByDeptId(String deptId) {
        return JsonResult.error("服务器繁忙...");
    }

    @Override
    public JsonResult getAllUserIdAndName() {
        return JsonResult.error("服务器繁忙...");
    }

    @Override
    public JsonResult getRepairOuserList(Map<String, Object> params) {
        return JsonResult.error("服务器繁忙...");
    }

    @Override
    public Map<String, Object> getDeptInfoById(String deptId) {
        log.error("路由服务器繁忙... getDeptInfoById");
        return Maps.newHashMap();
    }

    @Override
    public List<Map<String, Object>> selectRepairPeople(String name) {
        log.error("路由服务器繁忙... selectRepairPeople");
        return Lists.newArrayList();
    }

    @Override
    public JsonResult searchUserForName(String username) {
        return JsonResult.error("服务器繁忙...");
    }

    @Override
    public JsonResult getDeptNameByDeptId(Map<String, Object> params) {
        return JsonResult.error("路由服务器繁忙...");
    }

    @Override
    public JsonResult getLoginNameList(Map<String, Object> params) {
        return JsonResult.error("路由服务器繁忙...");
    }
}

